package icu.zlz.common.rabbitmq.service;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RabbitmqMessageService {


    @Autowired
    private RabbitTemplate rabbitTemplate;


    public void sendMessage(String queueName, String message) {
//        PersonInfoDto personInfoDto = JSONObject.parseObject(jsonStr, PersonInfoDto.class);
//        String jsonStr = JSON.toJSONString(personInfoDto);

        rabbitTemplate.convertAndSend(queueName, message);
    }
}